import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';

class Order extends StatelessWidget {
  const Order({Key? key}) : super(key: key);

  //我的订单顶部区域
  Widget _orderTitle() {
    return Container(
      margin: const EdgeInsets.only(top: 10),
      decoration: const BoxDecoration(
          color: Colors.white,
          border: Border(bottom: BorderSide(width: 1.0, color: Colors.black12))
      ),
      child: const ListTile(
        leading: Icon(Icons.list),
        title: Text('我的订单'),
        trailing: Icon(Icons.arrow_right),
      ),
    );
  }

  //我的订单列表区域
  Widget _orderType() {
    return Container(
      margin: const EdgeInsets.only(top: 5),
      width: ScreenUtil().setWidth(750).toDouble(),
      height: ScreenUtil().setHeight(150).toDouble(),
      padding: const EdgeInsets.only(top: 20),
      color: Colors.white,
      child: Row(
        children: [
          SizedBox(
            width: ScreenUtil().setWidth(187).toDouble(),
            child: Column(
              children: const [
                Icon(Icons.party_mode, size: 30,), Text('待付款')
              ],
            ),

          ),
          SizedBox(
            width: ScreenUtil().setWidth(187).toDouble(),
            child: Column(
              children: const [
                Icon(Icons.query_builder, size: 30,), Text('待发货')
              ],
            ),

          ),
          SizedBox(
            width: ScreenUtil().setWidth(187).toDouble(),
            child: Column(
              children: const [
                Icon(Icons.directions_car, size: 30,), Text('待收货')
              ],
            ),

          ),
          SizedBox(
            width: ScreenUtil().setWidth(187).toDouble(),
            child: Column(
              children: const [
                Icon(Icons.content_paste, size: 30,), Text('待评价')
              ],
            ),

          ),
        ],
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        _orderTitle(),
        _orderType()
      ],
    );
  }
}
